package server.resources;

import java.util.Arrays;
import java.util.List;

import server.database.AbstractTable;
import server.database.DatabaseColumn;
import server.database.IDatabaseTable;

public class AreasTable extends AbstractTable
{
	public static final String TABLE_NAME = "Areas";

	public static final DatabaseColumn ID = new DatabaseColumn(IDatabaseTable.ID, INTEGER, Arrays.asList(AUTO_INCREMENT));
	public static final DatabaseColumn NAME = new DatabaseColumn("name", STRING, Arrays.asList(UNIQUE));
	public static final DatabaseColumn DESCRIPTION = new DatabaseColumn("description", STRING, Arrays.asList(NOT_NULL));
	public static final DatabaseColumn VALID = new DatabaseColumn("valid", INTEGER, Arrays.asList(NOT_NULL, DEFAULT_VALID));

	public final List<DatabaseColumn> m_lstColumns = Arrays.asList(ID, NAME, DESCRIPTION, VALID);
	public final List<DatabaseColumn> m_lstKey = Arrays.asList(ID);

	@Override
	public String getTableName()
	{
		return TABLE_NAME;
	}

	@Override
	public List<DatabaseColumn> getColumns()
	{
		return m_lstColumns;
	}

	@Override
	public List<DatabaseColumn> getPrimaryKey()
	{
		return m_lstKey;
	}

	@Override
	public List<DatabaseColumn> getUniqueKey()
	{
		return null;
	}

}
